package com.soboot.collect.provider;

import com.soboot.log.utils.LogUtil;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.ApplicationPidFileWriter;
import org.springframework.cloud.context.config.annotation.RefreshScope;

/**
 * @Author:
 * @createTime: 2022年12月09日 15:07:15
 * @version:
 * @Description:
 * @Copyright:
 */
@RefreshScope
@MapperScan("com.soboot.provider.collect.mapper")
@SpringBootApplication(scanBasePackages = {"com.soboot.*","com.soboot.collect.*"})
public class CollectApplication {

    public static void main(String[] args) {
        SpringApplication springApplication = new SpringApplication(CollectApplication.class);
        //记录应用PID写入当前目录application.pid下
        springApplication.addListeners(new ApplicationPidFileWriter());
        springApplication.run(args);
        LogUtil.info("collect服务启动成功!");
    }
}
